package com.youcai.springboot_day05.controller;

import com.youcai.springboot_day05.dao.StudentDao;
import com.youcai.springboot_day05.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {

    @Autowired
    private StudentDao studentDao;

    @GetMapping("/finall")
    public List<Student> finallStudent(){
        List<Student> students = studentDao.finallStudent();
        System.out.println(students);
        return students;
    }

}
